package com.chocolatefordogs.writersnb.core;

import java.util.ArrayList;
import java.util.List;

import com.chocolatefordogs.writersnb.notes.Note;

public abstract class NotedObject {

	private List<Note> notes;

	public void addNote(final Note note) {
		if (this.notes == null) {
			this.notes = new ArrayList<Note>();
		}
		
		this.notes.add(note);
	}

	public void setNotes(final List<Note> notes) {
		this.notes = new ArrayList<Note>(notes);
	}

	public List<Note> getNotes() {
		return this.notes;
	}

	public boolean hasNotes() {
		return ((this.notes != null) && !(this.notes.isEmpty()));
	}
}